<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex布局</title>
    <style>
        body{
            font-size: 24px;
            background-color: #fff;
        }
        .main{
            display: flex;
            min-height: 500px;            
        }
        .main>*{
            border-radius: 7pt;
            margin: 5px;
            text-align: center;
        }
        nav{
            background-color: #ffba41;
            flex:1;
        }
        article{
            background-color: #719dca;
            flex:3;
        }
        aside{
            background-color: #ffba41;  
            flex:1;
        }
        header,footer{
            min-height: 100px;
            text-align: center;
            background-color: #ffba41;
            border-radius: 7pt;
            margin: 5px;
        }
        @media screen and (max-width:640px) {
            .main{
               flex-flow: column; 
            }
            nav,aside,header,footer{
                min-height: 50px;
                max-height: 50px;
            }
        }
    </style>
</head>
<body>
    <header>头部</header>
    <div class="main">
        <nav>导航</nav>
        <article>主体内容</article>
        <aside>广告栏</aside>
    </div>
    <footer>底部</footer>
</body>
</html>